package com.kandinfo.base.security.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;

import com.kandinfo.base.common.repository.BaseRepository;
import com.kandinfo.base.security.domain.UserRole;

public interface UserRoleRepository extends BaseRepository<UserRole, Long> {

    List<UserRole> findByRoleId(Long roldId);

    List<UserRole> findByUserId(Long userId);

    @Query(value = "select * from user_role where role_id = ?1 or role_id = ?2",nativeQuery = true)
    List<UserRole> findByRidUid(Long sId, Long dId);

}
